import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 */
/*输入两个正整数a和b，输出这两个正整数的和，差，积，商，模（若a>b则输出a-b，a/b，a%b的值反之输出b-a，b/a，b%a的值，不考虑小数，请使用int类型）
输入描述：两个正整数
输出描述：它们的和，差，积，商，模。每个值之间用空格隔开*/
public class Test2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        if( a> b){
            System.out.print( a + b +" ");
            System.out.print( a - b +" ");
            System.out.print( a * b +" ");
            System.out.print( a / b +" ");
            System.out.print( a % b );
        }else{
            System.out.print( b + a +" ");
            System.out.print( b - a +" ");
            System.out.print( b * a +" ");
            System.out.print( b / a +" ");
            System.out.print( b % a );
        }
    }
}
